/*
 * FeeBO.java
 *
 * Created on March 5, 2007, 8:07 PM
 *
 * Is an abstract class that holds the common attributes of its two sub-classes
 * (LateFeeBO, and DamageFeeBO).  Attributes included are the Amount of the fee
 * and whether or not it was waived by management
 */

package edu.byu.isys413.group1E.data;

/**
 * Contains Fee information
 * @author Jon Tehero
 */
public class FeeBO extends RevenueSourceBO {
    private String rentalID;
    private String employee;
    private double amount;
    private boolean waived;
    private boolean damaged;
    private int daysLate;
    private String description;
    private boolean alreadyInDB;
    private boolean dirty;
    
    /** Creates a new instance of SaleBO */
    FeeBO() {
        this.setType("fee");
        this.setIsDirty(true);
    }
    
    /**
     * Creates a new instance of TransactionBO with an ID
     * @param revSrcID contains the revSrcID
     */
    FeeBO(String revSrcID) {
        this.setType("fee");
        setRevSrcID(revSrcID);
        this.setIsDirty(true);
    }

    /**
     * Gets the rental id
     * @return rentalID
     */
    public String getRentalID() {
        return rentalID;
    }

    /**
     * sets the rental id
     * @param rentalID contains the rental id
     */
    public void setRentalID(String rentalID) {
        this.rentalID = rentalID;
        this.setIsDirty(true);
    }

    /**
     * Gets the Employee for this fee
     * @return the Employee id
     */
    public String getEmployee() {
        return employee;
    }

    /**
     * contains the string ID for the employee
     * @param employee contains the employee id
     */
    public void setEmployee(String employee) {
        this.employee = employee;
        this.setIsDirty(true);
    }

    /**
     * Gets the fee amount
     * @return amount
     */
    public double getAmount() {
        return amount;
    }

    /**
     * Sets the Fee amount
     * @param amount contains the amount
     */
    public void setAmount(double amount) {
        this.amount = amount;
        this.setIsDirty(true);
    }

    /**
     * indicates if the fee was waived
     * @return if the fee was waived
     */
    public boolean isWaived() {
        return waived;
    }

    /**
     * Sets if the fee was waived
     * @param waived indicates if the fee was waived
     */
    public void setWaived(boolean waived) {
        this.waived = waived;
        this.setIsDirty(true);
    }

    /**
     * Indicates if this is a fee for damage
     * @return if it's a damaged fee
     */
    public boolean isDamaged() {
        return damaged;
    }

    /**
     * 
     * Sets if the rental was damaged
     * @param damaged indicates if damaged
     */
    public void setDamaged(boolean damaged) {
        this.damaged = damaged;
        this.setIsDirty(true);
    }

    /**
     * Gets the days late
     * @return days late
     */
    public int getDaysLate() {
        return daysLate;
    }

    /**
     * 
     * Sets the days late
     * @param daysLate contains days late
     */
    public void setDaysLate(int daysLate){
        this.daysLate = daysLate;
        this.setIsDirty(true);
    }

    /**
     * 
     * Gets the description
     * @return description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the description
     * @param description contains the description
     */
    public void setDescription(String description) {
        this.description = description;
        this.setIsDirty(true);
    }

    /**
     * Indicates if has been saved to dB
     * @return if saved to DB
     */
    public boolean isAlreadyInDB() {
        return alreadyInDB;
    }

    /**
     * Sets if saved to DB
     * @param alreadyInDB indicates if saved to DB
     */
    public void setAlreadyInDB(boolean alreadyInDB) {
        this.alreadyInDB = alreadyInDB;
        this.setIsDirty(true);
    }

    /**
     * Checks if dirty
     * @return if dirty
     */
    public boolean isDirty() {
        return dirty;
    }

    /**
     * Sets if dirty
     * @param dirty indicates if dirty (info changed)
     */
    public void setDirty(boolean dirty) {
        this.dirty = dirty;
    }
}